@space: 22px;
@border_light: #d9d9d9;
@border_dark: #222629;
@import '~@/pages/global.less';

.modalDefault() {
  :global {
    .ant-modal-header {
      padding-top: 18px;
      padding-bottom: 0;
      border-bottom: 0;
    }

    .ant-modal-body {
      padding-top: 0;
      padding-right: @space;
      padding-bottom: 0;
      padding-left: @space;
    }

    .ant-modal-footer {
      padding: @space;
      padding-top: 0;
      border-top: 0;
    }

    .ant-btn + .ant-btn:not(.ant-dropdown-trigger) {
      margin-left: 16px;
    }
  }
}

.modal {
  .modalDefault();

  .modal_title {
    display: flex;
    align-items: center;
    height: 30px;
    padding-left: 37px;
    font-weight: 500;
    font-size: 18px;
    line-height: 1;
    background-image: url('~@/assets/img/plan_icon.png');
    background-repeat: no-repeat;
    background-size: 30px 30px;
  }

  .modal_body {
    display: flex;
    width: 100%;
    // height: 328px;
    // overflow: hidden;
    border-radius: 4px;

    .treebox,
    .choosebox {
      display: flex;
      flex: 1;
      flex-direction: column;
      padding: 16px 0;
      overflow: hidden;
    }

    .treebox {
      border-right: 1px solid @border_light;
    }

    .box_header {
      // padding: 0 16px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      height: 32px;
      margin-bottom: 8px;
    }

    .box_content {
      height: 480px;
      // flex: 1;
      // padding: 0 16px;
      overflow-y: auto;
    }

    .chooseList {
      margin: 0;
      padding: 0;
      color: #595959;
      list-style: none;

      > li {
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: 28px;

        .chooseName {
          flex: 1;
          overflow: hidden;
        }
      }
    }

    .close {
      width: 16px;
      height: 16px;
      color: #bfbfbf;
    }

    .clear {
      color: #8c8c8c;
      cursor: pointer;
    }
  }

  .foot {
    width: 80px;
    font-weight: 500;
    font-size: 12px;
    border-radius: 5px;
  }

  .search_act {
    color: #18a0fb;
  }
}

.emty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 512px;
}
html[data-type-color='dark'] {
  .modal {
    :global {
      ::-webkit-scrollbar {
        width: 6px;
        height: 10px;
        background: transparent;
      }

      ::-webkit-scrollbar-thumb {
        background: #acb1c1;
        border-radius: 5px;
        opacity: 0.5;
      }

      ::-webkit-scrollbar-track {
        border-radius: 5px;
      }

      .ant-modal-header,
      .ant-modal-content {
        background-color: #222629;
      }

      .ant-input-affix-wrapper {
        border-color: #4e5154;
      }

      .ant-checkbox-inner,
      .ant-tree-checkbox-inner,
      .ant-checkbox-indeterminate .ant-checkbox-inner {
        background: #222629;
        border-color: #fff;
      }

      .ant-modal-header {
        background: #222629 !important;
      }

      .ant-modal-body {
        background: #222629 !important;
      }
    }
    .modalDefault();

    .modal_title {
      // background-image: url('~@/assets/img/plan_icon_dark.png');
      background-image: url('~@/assets/img/plan_icon.png');
    }

    .modal_body {
      border-color: @border_dark;

      .treebox {
        border-color: @border_dark;
      }

      .chooseList {
        color: #fff;
      }

      .close {
        color: #d8d8d8;
      }

      .clear {
        color: #fff;
      }
    }
    .modelOverWrite();
  }
}

.cell {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 60px;

  .node_title {
    color: #fff;
    font-weight: 400;
    font-size: 14px;
    font-family: 'PingFang SC';
  }

  .node_flex {
    display: flex;
    align-items: center;
    margin-top: 4px;
    color: #d3d4d4;
    font-weight: 400;
    font-size: 12px;
    font-family: 'PingFang SC';

    .type_buy {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 44px;
      height: 20px;
      color: #30d485;
      font-weight: 400;
      font-size: 12px;
      font-family: 'PingFang SC';
      background: rgba(48, 212, 133, 0.1);
      border-radius: 2px;
    }

    .type_sale {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 44px;
      height: 20px;
      color: #fd4f43;
      font-weight: 400;
      font-size: 12px;
      font-family: 'PingFang SC';
      background: rgba(253, 79, 67, 0.1);
      border-radius: 2px;
    }

    .text {
      width: 625px;
      padding-left: 4px;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
    }
  }
}
